<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>动画</title>
</head>
<body>
    <div class="demo01">
        <div class="ball"></div>
    </div>
    <style>
        .demo01 {
            width: 600px;
            height: 300px;
            border: 1px solid rgb(107, 239, 210);
            position: relative;
            margin: auto;
        }
    
        .ball {
            background: rgb(226, 235, 101);
            border-radius: 50%;
            position: absolute;
            animation: ball 5s infinite;
        }
    
        @keyframes ball {
    
            from {
                width: 50px;
                height: 50px;
                left: 30px;
                top: 200px;
            }
    
            24% {
                width: 25px;
                height: 25px;
                left: 130px;
                top: 20px;
            }
    
            50% {
                width: 100px;
                height: 100px;
                left: 240px;
                top: 100px;
            }
    
            73% {
                width: 100px;
                height: 100px;
                left: 360px;
                top: 200px;
            }
    
            to {
                width: 150px;
                height: 150px;
                left: 420px;
                top: 70px;
            }
    
        }
    </style>
</body>
</html>